#ifndef CAMERA_H
#define CAMERA_H

#include <QWidget>
#include "v4l2camera.h"
#include <QDateTime>
#include <QDebug>

namespace Ui {
class camera;
}

class camera : public QWidget
{
    Q_OBJECT

public:
    explicit camera(QWidget *parent = nullptr);
    ~camera();
    void showimage(QImage image);
signals:
    void stop_camera();
    void destroythread();
    void photoupdate();
private slots:
    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

    void clearlabel();

private:
    Ui::camera *ui;
    v4l2camera *mycamera;
    QImage myimage;
    QString saveDir = "/mylinux/images";
};

#endif // CAMERA_H
